#ifndef __MAINCONTROL_H__
#define __MAINCONTROL_H__
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include "audio_element.h"

#define MAX_VOL_LEVEL   100
#define VOL_LEVEL_STEP  20
#define USE_EQUALIZER

typedef enum {
	MODE_Filter_A = 0, //heart level
	MODE_Filter_B,     //lung level
	MODE_Filter_C     //heart-lung level
}mode_type_t;

typedef enum{
	WIRED_EARPHONE = 0,
	BT_EARPHONE
}earphone_type;

extern int player_volume;
extern int gainA[];
extern int gainB[];
extern int gainC[];
extern uint8_t glanguage;

//extern int REC_DATA_SIZE;

extern int iHSSampleSeconds;	
extern int iLSSampleSeconds;

extern int iQuitCounter;
extern int iNoKeyPressed;
extern int iGotoSleep;

void change_mode(audio_element_handle_t handle);
mode_type_t get_mode();

void into_sleep_mode();
void into_ota_mode();
void change_earphone_type();

void display_update();
void show_mode(mode_type_t t);
void show_sound_level(uint8_t level);
uint8_t calc_sound_level();
void show_bat_level(uint8_t level);
void hide_bluetooth_icon();
void show_bluetooth_connect(bool connect);
void show_trans(bool show);
void show_sound();

void set_language(uint8_t language);
void set_busy(uint8_t status);

void set_wifiConfig(char* strSSID, char* strPwd, char *strOtaUrl);
void erase_ota_data_partition(void);

#endif
